/**
 * 15/02/2014
 * 
 * CustomerDAOInterface
 */
package org.cuatrovientos.erp.dao;

import java.util.List;

import org.cuatrovientos.erp.model.Customer;

/**
 * Interface for CustomerDAO class
 * @author Javier Tejedor
 */
public interface CustomerDAOInterface {
	
	/**
	 * Select by id
	 * @param id
	 * @return
	 */
	public Customer selectById(int id);
	
	/**
	 * Select all
	 * @return
	 */
	public List<Customer> selectAll();
	
	/**
	 * Inserts
	 * @param customer
	 */
	public void insert(Customer customer);
	
	/**
	 * Updates
	 * @param customer
	 */
	public void update(Customer customer);
	
	/**
	 * Deletes
	 * @param customer
	 */
	public void delete(Customer customer);
	
	/**
	 * Deletes by id
	 * @param id
	 */
	public void deleteById(int id);
	
	/**
	 * Searches
	 * @param name
	 * @return
	 */
	public List<Customer> search(String name);
	
	/**
	 * This saves or updates
	 * @param customer
	 */
	public void saveOrUpdate(Customer customer);
	
	/**
	 * Returns the count
	 * @return
	 */
	public int selectAllCount();

}
